<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilskey: xilskey_bbram_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilskey
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xilskey__bbram__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xilskey_bbram_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p><a class="el" href="xilskey__bbram__example_8c.html" title="xilskey_bbram_example.c ">xilskey_bbram_example.c</a> </p>
<dl class="section note"><dt>Note</dt><dd>Example illustrates the method of programming the AES key to BBRAM. The user key should be mentioned in <a class="el" href="xilskey__input_8h.html">xilskey_input.h</a>. BBRAM is a battery backed RAM and there is no restriction on the number of times key can programmed. This algorithm only wokrs when program and verify key are done together and in that order. Procedure:<ol type="1">
<li>Create a hardware project using the appropriate design.</li>
<li>Create a BSP.</li>
<li>Create fsbl</li>
<li>Create an application project using bbram example and <a class="el" href="xilskey__input_8h.html">xilskey_input.h</a></li>
<li>The 256 bit key to be programmed has to be mentioned</li>
<li>A hardware setup which dedicates four MIO pins for JTAG signals should be used and the MIO pins should be mentioned in <a class="el" href="xilskey__input_8h.html">xilskey_input.h</a> There should be a method to download this example and have the MIO pins connected to JTAG before running this application.</li>
<li>Run the application which will program and verify the BBRAM key</li>
<li>After programming and veifying the key, power off.</li>
<li>Place a BBRAM key encrypted boot image in one of the boot devices, set the appropriate boot pins and power on.</li>
<li>The bbram example will be run from DDR with the default linker.</li>
<li>To run from OCM, modify the linker to map all sections to ps7_ram_0_S_AXI_BASEADDR instead of ps7_ddr_0_S_AXI_BASEADDR.</li>
</ol>
</dd></dl>
<p>MODIFICATION HISTORY:</p>
<p>Ver Who Date Changes </p>
<hr/>
<p> 1.01a hk 09/18/13 First release 6.1 vns 10/25/16 Removed ForcePowerCycle and JtagDisable from Zynq BBRAM configuration as they are not actually programming any control bit. 6.7 psl 03/20/19 Added BBRAM jtag server init function. psl 03/15/19 Moved XilSKey_Bbram_JTAGServerInit function from example to library. 6.8 psl 05/21/19 Initialized SystemInitDone ,to indicate XilSKey_Bbram_JTAGServerInit status. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa2a34496cba738813e2c992e8d15a260"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xilskey__bbram__example_8c.html#aa2a34496cba738813e2c992e8d15a260">XilSKey_Bbram_InitData</a> (XilSKey_Bbram *BbramInstancePtr)</td></tr>
<tr class="memdesc:aa2a34496cba738813e2c992e8d15a260"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to initialize BBRAM instance.  <a href="#aa2a34496cba738813e2c992e8d15a260">More...</a><br/></td></tr>
<tr class="separator:aa2a34496cba738813e2c992e8d15a260"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa2a34496cba738813e2c992e8d15a260"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XilSKey_Bbram_InitData </td>
          <td>(</td>
          <td class="paramtype">XilSKey_Bbram *&#160;</td>
          <td class="paramname"><em>BbramInstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to initialize BBRAM instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BBRAM</td><td>instance pointer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><pre class="fragment">  - XST_SUCCESS - In case of Success
  - XST_FAILURE - If initialization fails
</pre></dd></dl>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BBRAM</td><td>instance pointer</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - In case of Success</li>
</ul>
</dd></dl>
<ul>
<li>XST_FAILURE - If initialization fails</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xilskey__utils_8c.html#aaeb26ca3e2bcdbf7207734864aa58af1">XilSKey_Efuse_ConvertStringToHexBE()</a>, <a class="el" href="xilskey__input_8h.html#a5b69a281922edbcc3706b4a7f9843d00">XSK_BBRAM_AES_KEY</a>, <a class="el" href="xilskey__input_8h.html#a752dcf195942b7d9a7d4e01d01e2b7fe">XSK_BBRAM_MIO_JTAG_MUX_SELECT</a>, <a class="el" href="xilskey__input_8h.html#a185ba8a1bbbe3dce6facb5c7e3add24f">XSK_BBRAM_MIO_JTAG_TCK</a>, <a class="el" href="xilskey__input_8h.html#a8ac2d516599594a2e245fd3260517fac">XSK_BBRAM_MIO_JTAG_TDI</a>, <a class="el" href="xilskey__input_8h.html#a855df416e26b9d6e82a6b1fd7bed3838">XSK_BBRAM_MIO_JTAG_TDO</a>, and <a class="el" href="xilskey__input_8h.html#a0ef1e832969a454349d7ed62d82e88b1">XSK_BBRAM_MIO_JTAG_TMS</a>.</p>

<p>Referenced by <a class="el" href="xilskey__bbram__ultrascale__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
